package com.ithema.b2b.goodsprovider.dao;

import model.Cart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CartDao {
    List<Cart> getAllCart(@Param(value = "uid")int uid);

    int insertCart(@Param(value = "goodsname")String goodsname,
                   @Param(value = "number")int number,
                   @Param(value = "price")int price,
                   @Param(value = "goodid")int goodid,
                   @Param(value = "uid")int uid);

    int updateCart(@Param(value = "number")int number, @Param(value = "id")int id);

    // 不建议使用delete，逻辑删除/物理删除
    int deleteCart(@Param(value = "did")int did);
}
